-- 从待重发zset中取出并删除指定时间戳之前的消息
local to_republish_zset = KEYS[1];
local nowTimeMillis = ARGV[1];

local member = redis.call('ZRANGEBYSCORE', to_republish_zset, 0, nowTimeMillis);
redis.call('ZREMRANGEBYSCORE', to_republish_zset, 0, nowTimeMillis);
return member